<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    info: { type: Object, required: true },
  },
});
</script>

<template>
  <view class="task-item">
    <image class="task-item-dot" src="/static/square-task-dot.png" />
    <view class="task-item-desc">
      <view class="task-item-desc2">{{ info.desc }}</view>
    </view>
    <view class="task-item-content">
      <image
        class="task-item-logo"
        :src="info.travel_agency_logo"
        mode="aspectFill"
      />
      <view class="task-item-name">{{ info.travel_agency_name }}</view>
      <view class="task-item-date">{{ info.cdate }}</view>
    </view>
  </view>
</template>

<style lang="scss">
.task-item {
  position: relative;
  padding: 50rpx 40rpx 0;

  .task-item-dot {
    position: absolute;
    left: 40rpx;
    top: 20rpx;
    width: 50rpx;
    height: 40rpx;
  }

  .task-item-desc {
    position: relative;
    height: 120rpx;
    margin-bottom: 10rpx;
  }

  .task-item-desc2 {
    font-size: 28rpx;
    color: #333333;
    line-height: 40rpx;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .task-item-content {
    display: flex;
    align-items: center;
  }

  .task-item-logo {
    flex-shrink: 0;
    width: 40rpx;
    height: 40rpx;
    border-radius: 50%;
  }

  .task-item-name {
    min-width: 0;
    margin-left: 10rpx;
    font-size: 20rpx;
    color: #666666;
    line-height: 28rpx;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .task-item-date {
    flex-shrink: 0;
    margin-left: 20rpx;
    font-size: 20rpx;
    color: #666666;
    line-height: 28rpx;
  }
}
</style>